{% assign data = section.settings %}
<div class="block_rich_text" style="--bg: {{data.bg_color}};--text-color: {{data.text_color}};">
  <div class="container_wrapper">
    <div class="content flex justify-center text-center">
      <div class="text_wrapper">
        {% if data.title != '' %}
          <div class="text_title public_title">{{data.title}}</div>
        {% endif %}
      </div>
    </div>
  </div>
</div>

{% schema %}
  {
    "class": "block_rich_text",
    "is_global": false,
    "icon": "icon-zidingyi",
    "name": {
      "zh_CN": "富文本",
      "en_US": "Rich text"
    },
    "blocks": [],
    "settings": [
      {
        "type": "card_header",
        "label": {
          "zh_CN": "设置"
        }
      }, {
        "type": "card_text_editor",
        "label": {
          "zh_CN": "标题",
          "en_US": "Title"
        },
        "id": "title",
        "default": "Share information about your brand with your customers. Describe a product, make announcements, or welcome customers to your store."
      }, {
        "type": "card_color",
        "id": "text_color",
        "label": {
          "zh_CN": "文字颜色",
          "en_US": "Text color"
        },
        "default": "#000"
      }
    ],
    "default": {
      "settings": {
        "title": "Share information about your brand with your customers. Describe a product, make announcements, or welcome customers to your store.",
        "text_color": "#000"
      },
      "blocks": []
    }
  }
{% endschema %}